<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 创建对象的三种方式
    // 1.通过 new Object() 创建对象
    const obj = new Object()

    // 2.通过字面量创建对象
    const obj1 = {}

    // 3.利用构造函数创建对象
    function Fn(name, age) {
        this.name = name;
        this.age = age;
    }
    console.dir(Fn);
    console.log(Fn.prototype);
    console.log(Fn.prototype.__proto__);
    console.log(Fn.prototype.__proto__ === Object.prototype);

    const xh=new Fn('小红',23)
    console.log(xh);

</script>

</html>